<template>
  <div id="root">
    <div id="head">
      <el-input
      placeholder="考试名称"
      v-model="input1"
      clearable>
    </el-input>
      <el-button type="primary" icon="el-icon-search">搜索</el-button>
      <el-button>考试时间</el-button>
      <el-date-picker
      v-model="value1"
      type="datetime"
      placeholder="选择开始时间">
    </el-date-picker>
    <el-date-picker
      v-model="value2"
      type="datetime"
      placeholder="选择结束时间">
    </el-date-picker>
     <el-button type="primary" icon="el-icon-search">搜索</el-button>
    </div>

    <!-- 表格显示 -->
      <el-table
        :data="tableData"
        border
        max-height="520px"
        style="width: 100%">
        <el-table-column
          prop="testName"
          label="考试名称"
          fixed
          width="180px">
        </el-table-column>
        <el-table-column
          prop="testTime"
          label="开始时间/结束时间"
          fixed
          width="260px">
        </el-table-column>
        <el-table-column
          prop="testClass"
          fixed
          label="考试班级">
        </el-table-column>
        <el-table-column
          prop="testNumber"
          label="理论/实际参考"
          width="120px">
        </el-table-column>
        <el-table-column
          prop="jigeNumber"
          label="及格人数"
          width="100px">
        </el-table-column>
        <el-table-column
          prop="averageGrade"
          label="平均成绩"
          width="100px">
        </el-table-column>
        <el-table-column
          prop="topGrade"
          label="最高分"
          width="100px">
        </el-table-column>
        <el-table-column
          prop="lowGrade"
          label="最低分"
          width="100px">
        </el-table-column>

        <el-table-column label="操作" width="80px" fixed="right">
          <template slot-scope="scope" >
            <el-button
              size="mini"
              type="success"
              @click="handleDelete(scope.$index, scope.row)">分析</el-button>
          </template>
        </el-table-column>
    </el-table>

  <!-- 回到顶部 -->
    <backTop></backTop>
  </div>
</template>

<style scoped>
#head {
  padding: 20px;
  border-bottom: 5px solid rgb(214, 211, 211);
}
.el-input {
  width: 20%;
}
</style>

<script>
  export default {
    data() {
      return {
        input1:'',
        value1:'',
        value2:'',
        tableData: [{
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        },
        {
          testName:'离散数学',
          testClass:'软件工程一班',
          testTime:'2022-1-1 0:00:00/2022-2-2 0:00:00',
          testNumber:'57/65',
          jigeNumber:'15/65',
          averageGrade:'95',
          topGrade:'100',
          lowGrade:'92',
        }]
      }},
      methods: {
      handleEdit(index, row) {
        console.log(index, row);
      },
      handleDelete(index, row) {
        console.log(index, row);
      }
    }
  }
</script>
<style scoped>
 
</style>
